﻿using OA.Model.MyAttribute;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OA.Model.DB
{
    [Table("Product")]
    public class Product: BaseInfo
    {

        /// <summary>
        /// 产品编号
        /// </summary>
        [MaxLength(20)]
        [Display(Name = "产品编号")]
        [Tag(TagEnum.Text, "required", "产品编号", 3, 50)]
        public string No { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [MaxLength(50)]
        [Display(Name = "产品名称")]
        [Tag(TagEnum.Text, "required", "产品名称", 3, 50)]
        public string Name { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        [Display(Name = "规格型号")]
        [MaxLength(50)]
        [Tag(TagEnum.Text, "required", "规格型号", 0, 50)]
        public string SpecificationsModel { get; set; }

        /// <summary>
        /// 类别
        /// </summary>
        public int CategoryID { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [Display(Name = "计量单位")]
        [Tag(TagEnum.Text, "required", "计量单位", 1, 1)]
        public string Unit { get; set; }

        /// <summary>
        /// 产品描述
        /// </summary>
        [Display(Name = "产品描述")]
        [Tag(TagEnum.TextArea, "required", "产品描述", 2, 2000)]
        public string Descriptions { get; set; }

        /// <summary>
        /// 加工成本
        /// </summary>
        [Display(Name = "加工成本")]
        [Tag(TagEnum.Money, "required", "加工成本", 2, 20)]
        public decimal ProcessingCost { get; set; }


        public int Status { get; set; }

       

        /// <summary>
        /// 重量
        /// </summary>
        [Display(Name = "重量")]
        [Tag(TagEnum.Number, "required", "重量", 2, 20)]
        public int Weight { get; set; }


        /// <summary>
        /// 总库存
        /// </summary>
        [Display(Name = "总库存")]
        [Tag(TagEnum.Number, "required", "排序", 2, 20)]
        public decimal AllStock { get; set; }

        /// <summary>
        /// 生产件
        /// </summary>
        [Display(Name = "生产件")]
        [Tag(TagEnum.Switch, "required", "生产件", 2, 20)]
        public bool IsProduction { get; set; }

        /// <summary>
        /// 采购件
        /// </summary>
        [Display(Name= "采购件")]
        [Tag(TagEnum.Switch, "required", "采购件", 2, 20)]
        public bool IsPurchase { get; set; }

    }
}
